package cn.mabach.config;

import cn.mabach.goods.repository.CategoryRepository;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/*
缓存预热
 */
@Component
public class mabachInitializingBean implements InitializingBean {
    @Autowired
    private CategoryRepository categoryRepository;
    @Override
    public void afterPropertiesSet() throws Exception {
        categoryRepository.getCategoryTreeFromCache();

    }
   
}
